ChatRoom

fun ChatRoom(    regionOrUrl: String,     tokenProvider: suspend () -> ChatToken,     maxReconnectAttempts: Int = 3,     id: String = UUID.randomUUID().toString()): ChatRoom

Construct a ChatRoom object using suspending tokenProvider function.

Parameters

regionOrUrl

AWS region name (e.g. "us-west-2") or web socket URL starting with "wss://" or "ws://"

tokenProvider

Suspending function called when ChatRoom requires a fresh IVS chat token

maxReconnectAttempts

Number of times the room will automatically retry web socket connection in case of connection failures